package com.totoro.mapper;

import com.totoro.pojo.Category;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author TOTORO
 * @date 2021/5/31 8:54
 * 分类Dao映射
 */
@Repository
public interface CategoryMapper {
    List<Category> findOneLevel();

    List<Category> findTwoLevel(@Param("value") String like);

    List<Category> findThreeLevel(@Param("value") String like);

    List<Category> findFourOrFiveLevel(@Param("value") String like);

    List<Category> findKeywordData(@Param("value") String like);

    List<Category> byIdFindCategoryName(@Param("id") int id);

    List<Category> underNameCheck(@Param("name") String name);

    Integer findIsBy(@Param("cid") int cid);

    List<Category> findIsHaveSpuAttr(@Param("cid") int cid);

    Integer updateBuyCounyByCid(@Param("cid") int cid);

    List<Category> findCategoryByCategoryIds(@Param("categoryIds") Integer[] categoryIds);

    List<Category> findAllTwoCategory();
}
